import request from "@/utils/request";

export const batchUpdate = (data) => {
  return request({
    url: "/api/shopcar/batchUpdate",
    method: "post",
    data,
    withoutToken: false,
  });
};

export const getShoppingCartItemsByOfferId = (offerId) => {
  return request({
    url: "/api/shopcar/getShoppingCartItemsByOfferId",
    method: "post",
    params: { offerId },
    withoutToken: false,
  });
};

export const getUserShoppingCartItems = () => {
  return request({
    url: "/api/shopcar/getUserShoppingCartItems",
    method: "post",
    withoutToken: false,
  });
};

/**
 * 批量删除  
 * @param {*} specId 
 * @returns 
 */
export const batchDelete = (specId) => {
  return request({
    url: "/api/shopcar/batchDelete",
    method: "post",
    data: specId,
    withoutToken: false,
  });
};
